/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2022-02-05 08:46:14
 * @LastEditors: GGB
 * @LastEditTime: 2022-02-05 08:46:15
 */
// 窗口事件处理函数
import { onUnmounted } from 'vue';
export const useWindowEvent = (eventType, callback) => {
    // 新增监听事件
    window.addEventListener(eventType, callback)
    // 移除监听事件
    const removeEventHandler = () => window.removeEventListener(eventType, callback)
    onUnmounted(removeEventHandler)
}